/*
 * DisclaimerPanel.java
 *
 */

package drayson.weboca.gui;

import org.netbeans.spi.wizard.WizardPage;
import java.awt.Component;

/**
 * The initial GUI ensuring the user has read and agreed to any terms.
 *
 * @author Michael Drayson
 * @version 1.0
 */
public class DisclaimerPanel extends WizardPage 
{
    /**
     * Creates new form DisclaimerPanel using the Wizard framework and initialises the objects on it
     */
    public DisclaimerPanel() 
    {
        super("Disclaimer", "Disclaimer");         // Passes parameters to the super class
        initComponents();                          // Initialises all components on the page
    }
    
    /**
     * Returns the description of the Disclaimer GUI form
     *
     * @return The description of the Disclaimer form
     */
    public static String getDescription() 
    {
        return "Disclaimer";
    }

    /**
     * Validates the JTextBox confirmBox to ensure that the user has agreed to the disclaimer
     *
     * @param component The component being validated
     * @param o The object being validated
     * @return The error presented by the Wizard framework if the condition isn't met
     */
    protected String validateContents (Component component, Object o) 
    {
        if (!confirmBox.isSelected()) {
            return "Please read the above and tick to confirm.";
        }
        return null;
    }
    
    
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        grpBuildType = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        confirmBox = new javax.swing.JCheckBox();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();

        jLabel1.setText("Thank you for downloading WeBoCa - public release 1.0.  This application has");
        jLabel1.setMaximumSize(new java.awt.Dimension(32767, 32767));

        jLabel2.setText("This application has been released under the GNU Lesser Public License");
        jLabel2.setMaximumSize(new java.awt.Dimension(32767, 32767));

        jLabel3.setText("This application has limited support, so why not have a go at fixing any bugs");

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel4.setText("scs4mpd@comp.leeds.ac.uk");

        confirmBox.setFont(new java.awt.Font("Tahoma", 3, 11));
        confirmBox.setText("Please tick here to confirm you agree to these terms");
        confirmBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        confirmBox.setMargin(new java.awt.Insets(0, 0, 0, 0));

        jLabel5.setText("Before contacting me, you may wish to check the WeBoCa's project home-");

        jLabel6.setText("and can be freely distributed and modified for academic and personal uses.");
        jLabel6.setMaximumSize(new java.awt.Dimension(32767, 32767));

        jLabel7.setText("you may come across, however, if you would like to contact me you can do");

        jLabel8.setText("so at the following e-mail address:");

        jLabel9.setText("page at ");

        jLabel10.setText("known issues and the latest WeBoCa downloads can be found.");

        jLabel11.setText("been written by Michael Drayson, and was built upon Andy Roberts JBootCat.");

        jLabel12.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel12.setText("http://code.google.com/p/weboca");

        jLabel13.setText("where a list of currently ");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel11)
                    .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel3)
                    .add(jLabel7)
                    .add(layout.createSequentialGroup()
                        .add(jLabel8)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel4))
                    .add(jLabel5)
                    .add(layout.createSequentialGroup()
                        .add(jLabel9)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel12)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel13))
                    .add(jLabel10)
                    .add(confirmBox))
                .addContainerGap(17, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel11)
                .add(15, 15, 15)
                .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(16, 16, 16)
                .add(jLabel3)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel7)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel8)
                    .add(jLabel4))
                .add(16, 16, 16)
                .add(jLabel5)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel9)
                    .add(jLabel12)
                    .add(jLabel13))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel10)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 40, Short.MAX_VALUE)
                .add(confirmBox)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JCheckBox confirmBox;
    private javax.swing.ButtonGroup grpBuildType;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    // End of variables declaration//GEN-END:variables

}
